package com.thti.mecool.client.adapter;

import java.util.HashMap;
import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.thti.mecool.client.activity.R;


public class MakePlanSelectTerminalAdapter extends BaseAdapter {
	private Context mContext;
    private HashMap<Integer, String> ProjectStores;
//	public MakePlanSelectTerminalAdapter(Context mContext,
//			List<Map<String, String>> listAdapter) {
//		super();
//		this.mContext = mContext;
//		this.listAdapter = listAdapter;
//	}
    
	public MakePlanSelectTerminalAdapter(Context mContext,
			HashMap<Integer, String> projectStores2) {
			super();
			this.mContext = mContext;
			this.ProjectStores = projectStores2;
	}
    
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return ProjectStores.size();
	}



	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return ProjectStores.get(position);
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		View view =((Activity) mContext).getLayoutInflater().inflate(R.layout.mecool_make_plan_select_terminal_item,null);
		TextView textView;
		try {
//			showWorkMemo=(ImageView)view.findViewById(R.id.mecool_make_plan_select_terminal_item_showworkmemo);
			view.setTag(position);
//			if(position==0||position==2){
//				showWorkMemo.setVisibility(View.VISIBLE);
//			}

			textView=(TextView)view.findViewById(R.id.mecool_make_plan_select_terminal_item_content);
			textView.setText(ProjectStores.get(position));
//			showWorkMemo.setOnClickListener(new OnClickListener() {
//				
//				@Override
//				public void onClick(View v) {
//					// TODO Auto-generated method stub
//					Intent intent=new Intent(mContext,WorkMemoRemindInPlanActivity.class);
//					mContext.startActivity(intent);
//				}
//			});
		
		} catch (Exception e) { 
			// TODO: handle exception
		}
		return view;
	}

}
